package godifactroy

import (
	"gitee.com/ichub/goconfig/common/base/baseutils/fileutils"
	"gitee.com/ichub/goconfig/common/ichublog"
	"gitee.com/ichub/goconfig/godi/internal/didto"
	"github.com/sirupsen/logrus"
	"github.com/stretchr/testify/suite"
	"testing"
)

type TestDiSuite struct {
	suite.Suite
	DiFactroy *DiFactroy
}

func TestDiSuites(t *testing.T) {
	suite.Run(t, new(TestDiSuite))
}

func (this *TestDiSuite) SetupTest() {
	this.DiFactroy = NewDiFactroy()
	ichublog.InitLogrus()
}

func (this *TestDiSuite) Test001_MakeDi() {
	var dto = didto.NewDiDto()
	dto.PkgName = "godifactroy"
	dto.StructName = "DiFactroy"
	dto.ForceBuild = true
	this.DiFactroy.MakeDi(dto)

}
func (this *TestDiSuite) Test002_MakeDi() {
	var r = fileutils.FindBeanGofileUtil().FindRootDirGoMod()
	logrus.Info(r)

}
